<template>
	<view>
		<cu-custom bgColor="bg-blue" :isBack="true"><block slot="content">更多企业</block></cu-custom>
		<view class="white_t2" v-for="(item,index) in list" :key="index" :data-comany_id="item.comany_id" @tap="getfirmid(item.company_id)">
			<view class="picbox">
				<block>
					<image class="picture" :src="item.logo" mode="aspectFill" v-if="item.logo"></image>
					<view v-else style="background-color: #2C405A; color: white; font-size: 50rpx; text-align: center; border-radius: 10rpx;">{{item.company_name[0]}}</view>
				</block>
			</view>
			<view class="white_li">
				<view class="firmname" >{{item.company_name}}</view>
				<view class="tagsword">{{item.tags}}</view>
			</view>
			<view class="icorig iconfont icon-you1"></view>
		</view>
	</view>
</template>

<script>
	const {appLogin,httpGet,httpPost,msg,timeToStr} = require("@/utils/common.js")
	export default {
		data() {
			return {
				list:[],
				comany_id:'',
			}
		},
		onLoad(option) {
			appLogin((user_info)=>{
				console.log(user_info)
				this.user_info = user_info
				this.comany_id = option.comany_id
				console.log(this.comany_id,option)
				this.getfirmlist()
			})
		},
		methods: {
			getfirmlist(){
				httpGet({
					url:'/api/student/cooperate_company_list',
					date:{
						page: this.page,
						page_size: this.page_size,
					}
				}).then((res)=>{
					this.list = res.result.list
					console.log(res)
				})
			},
			
			getfirmid(company_id){
				uni.navigateTo({
					url:"firmcooperation?company_id="+company_id
				})
			}
		}
	}
</script>

<style>
	.white_t2{
			background-color: #FFFFFF;
			width: 100%;
			height: 170rpx;
			/* line-height: 170rpx; */
			border-bottom-style: solid;
			border-color: #e5e5e5;
			border-width: 1px;
			display: flex;
		}
	.tagsword{
			font-size: 25rpx;
			color: #999999;
			margin-top: 5rpx;
		}
	.firmname{
		/* margin-bottom: 10rpx; */
		font-size: 30rpx;
	}
	.icorig{
		position: absolute;
		right: 20rpx;
		margin-top: 55rpx;
		font-size: 50rpx;
		color: #999999;
	}
	.picbox{
		width: 100rpx;
		height: 100rpx;
		line-height: 100rpx;
		border-radius: 10rpx;
		margin-left: 20rpx;
		margin-right: 30rpx;
		margin-top: 35rpx;
	}
	.picture{
		width: 100rpx;
		height: 100rpx;
		border-radius: 10rpx;
		text-align: center;
		line-height: 100rpx;
	}
	.white_li{
		margin-top: 40rpx;
		/* width: 520rpx; */
	}
	
</style>
